<template>
    <div class="y-breadcrumb">
        <a-breadcrumb>
            <template v-for="item in props.breadcrumbInfos" :key="item.name">
                <template v-if="item.path">
                    <a-breadcrumb-item :href="item.path">{{item.name}}</a-breadcrumb-item>
                </template>
                <template v-else>
                    <a-breadcrumb-item>{{item.name}}</a-breadcrumb-item>
                </template>
            </template>
        </a-breadcrumb>
    </div>
</template>

<script setup lang="ts">
import {YBreadcrumbProp} from "@/base-ui/breadcrumb/types";

const props = withDefaults(defineProps<{
    breadcrumbInfos: YBreadcrumbProp[]
}>(), {
    breadcrumbInfos: () => []
})
</script>

<style scoped lang="less">

</style>
